package top.glike.funct.service.impl;

import java.util.List;
import top.glike.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.glike.funct.mapper.GbWebsiteMessageMapper;
import top.glike.funct.domain.GbWebsiteMessage;
import top.glike.funct.service.IGbWebsiteMessageService;

/**
 * 站点留言Service业务层处理
 * 
 * @author Sophia
 * @date 2024-02-13
 */
@Service
public class GbWebsiteMessageServiceImpl implements IGbWebsiteMessageService 
{
    @Autowired
    private GbWebsiteMessageMapper gbWebsiteMessageMapper;

    /**
     * 查询站点留言
     * 
     * @param id 站点留言主键
     * @return 站点留言
     */
    @Override
    public GbWebsiteMessage selectGbWebsiteMessageById(String id)
    {
        return gbWebsiteMessageMapper.selectGbWebsiteMessageById(id);
    }

    /**
     * 查询站点留言列表
     * 
     * @param gbWebsiteMessage 站点留言
     * @return 站点留言
     */
    @Override
    public List<GbWebsiteMessage> selectGbWebsiteMessageList(GbWebsiteMessage gbWebsiteMessage)
    {
        return gbWebsiteMessageMapper.selectGbWebsiteMessageList(gbWebsiteMessage);
    }

    /**
     * 新增站点留言
     * 
     * @param gbWebsiteMessage 站点留言
     * @return 结果
     */
    @Override
    public int insertGbWebsiteMessage(GbWebsiteMessage gbWebsiteMessage)
    {
        return gbWebsiteMessageMapper.insertGbWebsiteMessage(gbWebsiteMessage);
    }

    /**
     * 修改站点留言
     * 
     * @param gbWebsiteMessage 站点留言
     * @return 结果
     */
    @Override
    public int updateGbWebsiteMessage(GbWebsiteMessage gbWebsiteMessage)
    {
        gbWebsiteMessage.setUpdateTime(DateUtils.getNowDate());
        return gbWebsiteMessageMapper.updateGbWebsiteMessage(gbWebsiteMessage);
    }

    /**
     * 批量删除站点留言
     * 
     * @param ids 需要删除的站点留言主键
     * @return 结果
     */
    @Override
    public int deleteGbWebsiteMessageByIds(String[] ids)
    {
        return gbWebsiteMessageMapper.deleteGbWebsiteMessageByIds(ids);
    }

    /**
     * 删除站点留言信息
     * 
     * @param id 站点留言主键
     * @return 结果
     */
    @Override
    public int deleteGbWebsiteMessageById(String id)
    {
        return gbWebsiteMessageMapper.deleteGbWebsiteMessageById(id);
    }
}
